<%@page import="java.util.Date"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/classes/CommonHelper.class.jsp" %>
<%@ include file="/classes/DBHelper.class.jsp"%>
<%
String loginId=(String)(session.getAttribute("loginId")==null?"":session.getAttribute("loginId"));
if(nullOrEmpty(loginId)){
	out.print("<script>alert(\"请登陆后操作！\");</script>");
	out.print("<script>window.location.href = 'http://htgl.cnsn.gov.cn/cas/login';</script>");
	return;
}
String userid=(String)session.getAttribute("userId");

//获取部门ID
String dept_code = "";
String sqlDept = "select t2.code_name from cms_user t1,cms_department t2 where t1.dept_id = t2.dept_id and login_id = ?";
Map<String,Object> user = getObject(sqlDept,new Object[]{loginId});
if(null!=user)
	dept_code = (String)user.get("code_name");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>民意征集-后台新增  </title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></meta>
<script charset="utf-8" src="editor/kindeditor.js"></script>
<script charset="utf-8" src="editor/lang/zh_CN.js"></script>
<script type="text/javascript" src="js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="../js/dialog/lhgdialog/lhgdialog.min.js?skin=chrome"></script>

<script type="text/javascript">
KindEditor.ready(function(K) {
	window.editor = K.create('#content', {
		cssPath : 'editor/plugins/code/prettify.css',
		uploadJson : 'editor/jsp/upload_json.jsp',
		fileManagerJson : 'editor/jsp/file_manager_json.jsp',
		allowFileManager : true,
		afterCreate : function() {
			var self = this;
			K.ctrl(document, 13, function() {
				self.sync();
				document.forms['example'].submit();
			});
			K.ctrl(self.edit.doc, 13, function() {
				self.sync();
				document.forms['example'].submit();
			});  
		} 
	}); 
});
</script>
<script type="text/javascript">
	$(function(){
		var userid='<%=userid%>';
		$('#website_code').dialog({ 
				content:'url:/website-webapp/check/js/dialog/website.jsp?userid='+userid+'&text=website_code' ,
				lock:true,
				drag:true,
				min:false,
				max:false,
				title:"<div style='float: left;'>所属站点<div>",
				width:640,
				height:440
							 
			});   
		});
</script>
</head>
<body>
	<form action="myzj_save_do.jsp" method="post">
 	<div style=" width:1002px; margin:auto;">
		<table width="920" border="0" cellspacing="0" cellpadding="0" style=" margin:auto;">
			<tr>
				<td width="111" style=" height:40px; line-height:40px; ">征集标题</td>
				<td width="609" align="left"><input type="text" name="title" id="title" style=" width:250px;" > </td>
			</tr>
			<tr>
			<tr>
				<td width="111" style=" height:40px; line-height:40px; ">选择站点</td>
				<td width="609" align="left"><input type="text" name="website_code" id="website_code" style=" width:250px;" readonly> </td>
			</tr>
			<tr>
				<td valign="top"  >征集内容</td>
				<td align="left">
					<div class="manuscript-left-box" id="shite1">
					<textarea id="content" name="content" style="width:700px;height:300px;visibility:hidden;"></textarea>
					</div>
				</td>  
			</tr>  

            <input type="hidden" id="dept_code" name="dept_code" value="<%=dept_code %>" >
			<tr>  
            	<td style=" height:40px; line-height:40px; ">开始时间 </td>
				<td align="left">   
					<input type="text" name="kssj" class="Wdate" readonly="readonly" style="width: 160px;" onclick="WdatePicker()"/>
                </td>      
            </tr>          
            <tr>
            	<td style=" height:40px; line-height:40px; ">截止时间</td>
				<td align="left">
					<input type="text" name="jzsj" class="Wdate" readonly="readonly" style="width: 160px;" onclick="WdatePicker()"/>
                </td>  
            </tr>  
			<tr>
				<td style=" height:40px; line-height:40px; ">立即发布</td>
				<td align="left"><input type="radio" name="status" value="1" checked="checked">是
					<input type="radio" name="status" value="2">否</td>
               
			</tr>
            <tr>
			<tr><td height="20">&nbsp;</td></tr>
				<td colspan="2" style=" text-align:center;" ><input type="submit" value="" style=" background:url(images/tj.jpg) no-repeat; border:0px; width:85px; height:23px;">
				<input type="button" value=""  onClick="window.location.href='myzj_list.jsp?r=<%=new Date().getTime() %>'"  style=" background:url(images/fh.png) no-repeat; border:0px; width:85px; height:23px; margin-left:20px;">
				</td>
			</tr>
		</table>
        </div>
	</form>
    
	<script type="text/javascript">
	function openbm(){
		var rsName = window.showModalDialog("bmlist.html","bmlist","dialogWidth=1024px;dialogHeight=768px");
		var str = rsName.split(";");
		document.getElementById("dept_name").value=str[1];
		document.getElementById("dept_code").value=str[0];
	}
	</script>
</body>
</html>